﻿using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Collections.Generic;
using HRMSystem.Util;


namespace HRMSystem.Wpf.EmployeePages
{
    /// <summary>
    /// Interaction logic for Employee EditProfilePage.xaml
    /// </summary>
    public partial class EditProfilePage : Page
    {
        private static EditProfilePage instance;
        public IList<string> ErrorList { get; set; }

        private EditProfilePage()
        {
            InitializeComponent();

            EmployeeContentFrame.Content = new EmployeeInfo(Mode.EDIT);
            ContactsContentFrame.Content = new ContactsInfo(Mode.EDIT);
        }

        public static EditProfilePage Instance
        {
            get
            {
                if (instance == null)
                {
                    instance = new EditProfilePage();
                }

                return instance;
            }
        }

        private void Page_SizeChanged(object sender, SizeChangedEventArgs e)
        {
            var h = ((System.Windows.Controls.Panel)Application.Current.MainWindow.Content).ActualHeight;
            ScrollBar.Height = h - 150;
        }
    }
}
